package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  SalelistItem.java
 * Author:  Administrator
 * Purpose: Defines the Class SalelistItem
 ***********************************************************************/

/**
 * 销售单明细
 * 
 * @pdOid 47d848a1-b5e9-4fc3-92b7-aaff6afa0c76
 */
@Entity
@Table(name = "XSGL_SALELIST_ITEM")
public class SalelistItem extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7842258960331463810L;
	/**
	 * 商品
	 * 
	 * @pdOid e91d1faa-c62c-4be9-b4bc-3937addcaf15
	 */
	private Goods goods;
	/**
	 * 销售数量
	 * 
	 * @pdOid 33165896-8750-4495-a997-fc1d81ff5fa4
	 */
	private Integer number;
	/**
	 * 销售总额
	 * 
	 * @pdOid 14811377-2ef8-42db-a6e5-02de98528167
	 */
	private Double total;
	/**
	 * 售价
	 * 
	 */
	private Double salePrice;
	/**
	 * 销售单
	 * 
	 * @pdOid 01931a94-d2cc-4964-9960-6bbc0545780a
	 */
	private Salelist salelist;
	/**
	 * 备注
	 * 
	 */
	private String remark;
	/**
	 * 退货
	 */
	private Boolean refund = false;

	@Column(name = "SALE_PRICE", length = 10, precision = 2)
	public Double getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@ManyToOne
	@JoinColumn(name = "GOODS_ID")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	@Column(name = "NUMBER", length = 10)
	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	@Column(name = "TOTAL", length = 10, precision = 2)
	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
	@JoinColumn(name = "SALELIST_ID")
	public Salelist getSalelist() {
		return salelist;
	}

	public void setSalelist(Salelist salelist) {
		this.salelist = salelist;
	}

	@Column(name = "REFUND")
	public Boolean getRefund() {
		return refund;
	}

	public void setRefund(Boolean refund) {
		this.refund = refund;
	}

}